﻿using SDL2;
using System;
using System.Collections.Generic;
using System.Text;

namespace BITUI
{
    public enum WindowOption_ScaleMode
    {
        AutoTileCount,//固定缩放值不变，tilewidth 和 tileheight会随着窗口缩放改变
        FixTileSize,//固定tile尺寸不变, 缩放值改变
    }

    public struct WindowOption
    {
        public string title;
        public int tileWidth;
        public int tileHeight;
        /// <summary>
        /// 每个tile的尺寸
        /// </summary>
        //public WindowOption_TileSize tilesize; tilesize 永恒为8
        public WindowOption_ScaleMode scaleMode;
        public bool linear;
        public float scale;//屏幕显示缩放 取值1~8，可以有小数
        //public bool indexColor;//不在这个层次支持这玩意
        //public SDL.SDL_Color[] palette;
        public static WindowOption Auto_Scale4X
        {
            get
            {
                WindowOption t = new WindowOption();
                //t.tilesize = WindowOption_TileSize.pixel_08;
                t.scaleMode = WindowOption_ScaleMode.AutoTileCount;
                t.scale = 4.0f;
                t.linear = false;
                return t;
            }
        }
        public static WindowOption Fix_Scale4X
        {
            get
            {
                WindowOption t = new WindowOption();
                //t.tilesize = WindowOption_TileSize.pixel_08;
                t.scaleMode = WindowOption_ScaleMode.FixTileSize;
                t.scale = 4.0f;
                t.linear = true;
                return t;
            }
        }
       
    }
}
